<!--
@File    : 06_键盘事件注册.html
@Time    : 2019/6/4 19:05
@Author  : wangshunqing
@Email   : wangshunqing@yihuacomputer.com
@Software: WebStorm
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>06_键盘事件注册</title>
    <script src="lib/vue@2.6.10.js"></script>
    <script src="./lib/vuex@3.1.1.js"></script>
    <script src="./lib/vue-router@3.0.6.js"></script>
</head>

<body>
    <div id="app">
        <input @keyup.enter="submit" type="text"  placeholder="click Enter">
        <input @keyup.a ="clickA" type="text" placeholder="click A">
        <input @keyup.alt.67="clear" placeholder="Alt + C">


    </div>
</body>
<script>
    Vue.config.keyCodes.a = 65;
    var vm = new Vue({
        el: '#app',
        data: {
            message: 'Hello Vue!'
        },
        methods:{
            submit () {
                alert("enter");
            },
            clear(){
                alert("Alt + C");
            },
            clickA (){
                alert("clickA");
            }
        },
        mounted() {
        },
        watch: {}
    })
</script>
</html>